﻿@using Gx.Model.ViewModel;
@using System.Globalization;
@model LKSettlementPaymentDto
@{
    ViewBag.Title = "结算费用清单打印";
    Layout = "~/Views/Shared/PrintMaste.cshtml";
}

<div id="PrintContent">
    <!--begin-->
    <table class="gridtable">
        <thead>

            <tr>
                <th colspan="22" style="font-weight: bold; border: 0px solid #e8e8e8;">亳州市中昆供应链管理服务有限公司</th>
            </tr>
            <tr>
                <th colspan="22" style="font-weight: bold; border: 0px solid black;">结算费用清单</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td colspan="22" style="text-align: left; border: 0px; font-size: 24px">客户：@string.Format("{0}({1})", Model.SettlementPayment.CustomerNo, Model.SettlementPayment.CustomerName)</td>
            </tr>
            <tr>
                @{
                    string datestr= string.Empty;
                    if (Model.Details.Any())
                    {
                        datestr = string.Format("{0}~{1}", Model.Details.Min(c => c.BeginTime).ToString("yyyy-MM-dd"), Model.Details.Max(c => c.EndTime).ToString("yyyy-MM-dd"));
                    }
                }
                <td colspan="19" style="text-align: left;border:0px; font-size: 18px">
                    起止日期：@datestr

                </td>
                <td colspan="3" style="text-align: left;border:0px; font-size: 18px">打印日期：@DateTime.Now.ToString("yyyy年MM月dd日")</td>
            </tr>
            <tr>
                <td>日期</td>
                <td>天数</td>
                <td>商品批号</td>
                <td>商品名称</td>
                <td>规格</td>
                <td>类型</td>
                <td>柜号</td>
                <td>件重</td>
                <td>件数</td>
                <td>吨重</td>
                <td>托盘数/面积</td>
                <td>板数</td>
                <td>冷藏单价</td>
                <td>冷藏费用</td>
                <td>处置费</td>
                <td>装卸费</td>
                <td>加班费</td>
                <td>分检费</td>
                <td>过磅费</td>
                <td>配送费</td>
                <td>其他费</td>
                <td>小计</td>
            </tr>
            @foreach (var item in Model.Details)
            {
                <tr>
                    <td>
                        <span class="inner_span">@item.BeginTime.ToString("yyyy-MM-dd")-<span class="inner_span">@item.EndTime.ToString("yyyy-MM-dd")</span></span>
                    </td>
                    <td><span class="inner_span">@item.Days</span></td>
                    <td><span class="inner_span">@item.GoodsNo</span></td>
                    <td><span class="inner_span">@item.GoodsName</span></td>
                    <td><span class="inner_span">@item.GoodsSpecName</span></td>
                    <td><span class="inner_span">@item.CostType</span></td>
                    <td><span class="inner_span">@item.ContainerNumber</span></td>
                    <td><span class="inner_span">@item.Weight</span></td>
                    <td><span class="inner_span">@item.Number</span></td>
                    <td><span class="inner_span">@item.TonWeight</span></td>
                    <td><span class="inner_span">@item.Area</span></td>
                    <td><span class="inner_span">@item.PlateNumber</span></td>
                    <td><span class="inner_span">@item.ColdUnitPrice</span></td>
                    <td><span class="inner_span">@item.ColdCost</span></td>
                    <td><span class="inner_span">@item.Chuzhi</span></td>
                    <td><span class="inner_span">@item.Zhuangxie</span></td>
                    <td><span class="inner_span">@item.Jiaban</span></td>
                    <td><span class="inner_span">@item.Fenjian</span></td>
                    <td><span class="inner_span">@item.Guobang</span></td>
                    <td><span class="inner_span">@item.Peisong</span></td>
                    <td><span class="inner_span">@item.Qita</span></td>
                    <td><span class="inner_span">@item.TotalAmount</span></td>
                </tr>
            }
            <tr id="hjtr">
                <td colspan="13">合计</td>
                <td><span>@Model.Details.Sum(c => c.ColdCost)</span></td>
                <td><span>@Model.Details.Sum(c => c.Chuzhi)</span></td>
                <td><span>@Model.Details.Sum(c => c.Zhuangxie)</span></td>
                <td><span>@Model.Details.Sum(c => c.Jiaban)</span></td>
                <td><span>@Model.Details.Sum(c => c.Fenjian)</span></td>
                <td><span>@Model.Details.Sum(c => c.Guobang)</span></td>
                <td><span>@Model.Details.Sum(c => c.Peisong)</span></td>
                <td><span>@Model.Details.Sum(c => c.Qita)</span></td>
                <td><span>@Model.Details.Sum(c => c.TotalAmount)</span></td>
            </tr>
        </tbody>
    </table>
    <!--end-->
</div>

